#include "common.hpp"


int main()
{
    int fd = open(PIPE_NAME, O_RDONLY);
    assert(fd != -1);
    while (true)
    {
        char buffer[1024];
        ssize_t n = read(fd, buffer, sizeof buffer - 1);
        if (n == 0)
            break;
        buffer[n] = 0;
        cout << "server->client " << buffer << endl;
    }
    return 0;
}
